<?php

define('CURSCRIPT', 'home');
require_once './core/init.inc.php';
$navtitle.= ' - 首页';

if(isset($_GET['version'])){
	showmsg('SCU Projector (Alpha Version) Build 20120414');

}else if($_G['admin']->isLogged()){
	$warninglist = array();
	if(empty($_G['setting']['dbpw'])){
		$warninglist[] = array('link' => '#', 'content' => '您的数据库密码为空，这会允许数据库远程匿名登录。');
	}
	if(rmd5('admin') == $_G['admin']->v['pwmd5']){
		$warninglist[] = array('link' => 'admincp.php?action=edit', 'content' => '您未修改初始密码，您的账号非常危险。');
	}
	
	$projectlist1 = Project::getItemByUnusedRatio($_G['setting']['home_unusedratio'], 0, 4);
	$projectlist2 = Project::getItemByDeadline($_G['setting']['home_deadlinelimit'], 0, 4);

	include view('home');
}else{
	include view('memcp_login');
}

?>